home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / datatypes / targa.datatype / targa.datatype.install < prev    next >
Text File  |  1996-04-07  |  3KB  |  123 lines

  1. ; Targa Datatype Installer Script
  2. ; $VER: targa.datatype.install 39.0 (22.1.95)
  3.  
  4. ; First make sure we have WB3.0
  5. (set @default-dest "")
  6. (if (< (/ (getversion) 65536) 39)
  7. (
  8.   (abort "You must have at least Workbench 3.0")
  9. ))
  10.  
  11. ; Now check for at least a 68020 processor
  12. (set proc (database "cpu"))
  13.  
  14. (set cpu (askchoice
  15.   (prompt "Which version do you want to install ?")
  16.   (choices "68000" "68020")
  17.   (if (OR (= proc "68000") (= proc "68010"))
  18.     (default 0)
  19.     (default 1)
  20.   )
  21.   (help
  22.     (cat "On machines with an 68020 processor or higher, like "
  23.          "the Amiga 1200, 2500, 3000 and 4000 you can select "
  24.          "the 68020 version, which is optimized for those "
  25.          "processors.\n\n"
  26.          "If you have an Amiga with a 68000 or 68010 processor, "
  27.          "like the standard version of the Amiga 500, 500+, "
  28.          "600, 2000 and you have upgraded to Kickstart 3.0 or "
  29.          "higher, then you must select the 68000 version."))
  30. ))
  31.  
  32. ; Check that the DataTypes directory exists
  33. (if (NOT (exists "SYS:Classes/DataTypes"))
  34. (
  35.   (abort "Can't find the SYS:Classes/DataTypes directory")
  36. ))
  37.  
  38. ; Copy the datatype to it
  39. (copylib
  40.   (prompt "")
  41.   (help @copyfiles-help)
  42.   (if (= cpu 0)
  43.     (source "Classes/DataTypes/targa.datatype.68000")
  44.     (source "Classes/DataTypes/targa.datatype.68020")
  45.   )
  46.   (dest "SYS:Classes/DataTypes")
  47.   (newname "targa.datatype")
  48.   (confirm)
  49. )
  50.  
  51. ; Find out what sort of installation this is
  52. (set choice (askchoice
  53.   (prompt "Install as permanently enabled, or manually selectable")
  54.   (choices "Permanently enabled" "Manual select")
  55.   (help
  56.     (cat "The datatype can be installed as permanently enabled, or"
  57.          " manually selectable.\n\n"
  58.          "Pemanently enabled means that the datatype is always ready for use.\n\n"
  59.          "Manually Selectable means that the datatype has to be\n"
  60.          "run before it can be used. Once it has been run, it\n"
  61.          "remains installed until the computer is rebooted."))
  62. ))
  63.  
  64. (if (= choice 0)
  65. (
  66.   ; Permanent installation
  67.   ; Check that the DataTypes directory exists
  68.   (if (NOT (exists "DEVS:DataTypes"))
  69.   (
  70.     (abort "Can't find the DEVS:DataTypes directory")
  71.   ))
  72.  
  73.   (if (NOT (exists "DEVS:DataTypes/Targa"))
  74.   (
  75.     ; Copy the datatype to it
  76.     (copyfiles
  77.       (prompt "")
  78.       (help @copyfiles-help)
  79.       (source "Devs/DataTypes/Targa")
  80.       (infos)
  81.       (dest "DEVS:DataTypes")
  82.     )
  83.   ))
  84. )
  85. (
  86.   ; Manual installation
  87.   ; Check that the storage directory exists
  88.   (if (NOT (exists "SYS:Storage/DataTypes"))
  89.   (
  90.     (abort "Can't find the SYS:Storage/DataTypes directory")
  91.   ))
  92.  
  93.   (if (NOT (exists "SYS:Storage/DataTypes/Targa"))
  94.   (
  95.     ; Copy the datatype to it
  96.     (copyfiles
  97.       (prompt "")
  98.       (help @copyfiles-help)
  99.       (source "Devs/DataTypes/Targa")
  100.       (infos)
  101.       (dest "SYS:Storage/DataTypes")
  102.     )
  103.   ))
  104. ))
  105.  
  106. ; Now exit, telling them what the situation is
  107. (if (= choice 0)
  108. (
  109.   ; Installation was permanent
  110.   (exit
  111.     (cat "You will have to reboot the system before you can use the "
  112.          "Targa datatype."
  113.   ))
  114. )
  115. (
  116.   ; Installation was manual
  117.   (exit
  118.     (cat "You must double-click on the Targa icon in the "
  119.          "Storage->DataTypes drawer on your Workbench disk in order to "
  120.          "use the Targa datatype. The datatype will then be available "
  121.          "for use until you reboot."
  122.   ))
  123. ))